package com.ytmz.gateway.security;

import java.util.ArrayList;
import java.util.List;

/**
 * 鉴权配置
 *
 * @author Chill
 */
public class AuthProvider {

    public static String TARGET = "/**";
    public static String REPLACEMENT = "";
    private static List<String> defaultSkipUrl = new ArrayList<>();

    static {
        defaultSkipUrl.add("/auth/code");
        defaultSkipUrl.add("/api/visits");
        defaultSkipUrl.add("/auth/login");
        defaultSkipUrl.add("/v2/api-docs/**");
        defaultSkipUrl.add("/webjars/springfox-swagger-ui/**");
        defaultSkipUrl.add("/swagger-ui.html");
        defaultSkipUrl.add("/swagger-resources/**");
        defaultSkipUrl.add("/assets/**");
        defaultSkipUrl.add("/devel/**");
        defaultSkipUrl.add("/system/");
    }

    /**
     * 默认无需鉴权的API
     */
    public static List<String> getDefaultSkipUrl() {
        return defaultSkipUrl;
    }

}
